home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freaks Macintosh Archive
/
Freaks Macintosh Archive.bin
/
Freaks Macintosh Archives
/
Ham⁄GPS
/
IP Folder
/
HAMradio TCP⁄IP
/
Docs
/
MacIP Specs 2
< prev
next >
Wrap
Text File
|
1993-01-03
|
10KB
|
254 lines
AA Protocol Specification 8/21/90
Josh Littlefield
Cayman Systems
rev 1.0
AA Protocol Specification
1. Introduction
This document describes the AA protocol, which is used between the
atalkad daemon and certain AppleTalk/Ethernet routers, and between the
routers themselved. The protocol is based on UDP. This description
is derived from the C source code of the KIP software distribution
from Stanford University.
2. Configuration
Each router is pre-configured with the IP address of the
administration host (the host running atalkad). On boot-up, the
router makes configuration (aaCONF) requests to the administration
hosts until a response is received. The KIP code makes these requests
at 5 second intervals. K-Star makes requests at intervals
increasing by 5 seconds each time, with a maximum interval of
2 minutes between requests. The GatorBox does the same.
Configuration information consists of AppleTalk network numbers for
the router's LocalTalk, EtherTalk and KIP (UDP encapsulated AppleTalk)
interfaces. It also specifies the IP broadcast address, the base UDP
port numbers, the number of static and dynamic IP addresses the router
may assign to AppleTalk nodes, and flags indicating restrictions to
apply to NBP lookup replies passing through the router.
3. Initial Routes
Having received its configuration, the router now requests its initial
routing information (aaROUTEI) from the administration host. This
request is repeated at 1 minute intervals until a response is
received. This initial route information comes in the form of routing
tuples with the following data:
AppleTalk net #
IP address (typically of bridge node), or IP net.
distance
type
The type field may indicate one of the following flags:
K - A route to LocalTalk net via IP address. Typically
a K-Box or GatorBox.
N - A mapping between IP net and AppleTalk net, where IP
net supports directed broadcast.
H - A mapping between IP net and AppleTalk net, where IP
net does broadcasts are performed by re-broadcast
service at IP address.
Additionally, the K flag may be accompanied by the C flag, which
indicates the router at IP address is a core router. And the N flag
is accompanied by a value indicating how to many bytes of 0xFF should
be or'd into IP net to form the broadcast address.
These routes are added into the route table, with their flags. An
additional flag is added to them to indicate that they came from an
aaROUTEI packet. We'll refer to these as AA routes.
On receiving an aaROUTEI packet, the router purges all previous AA
routes, adds the new routes, and responds with an aaROUTEQ request.
(Although the current atalkad ignores aaROUTEQ packets.)
4. Propagation of Routes
Once the initial routing (aaROUTEI) packet has been received, locally
discovered routes may be propagated with the help of core routers.
Once a minute each router sends an aaROUTEQ packet to one core router.
Each core router is used in turn. The aaROUTEQ packet should contain
all non-IP routes in the table -- that is, routes which are not via an
IP host. The format of the tuples in the aaROUTEQ packet is identical
to that of the aaROUTEI tuples.
There is nothing special about a core router, except that it will be
sent aaROUTEQ packets. All routers speaking the AA protocol should be
capable of acting as a core router.
On receiving an aaROUTEQ packet, the router assimilates the new routes
and responds with an aaROUTE packet. This packet contains all non-AA
routes, in the same tuples format as the aaROUTEI and aaROUTEQ
packets.
In this way, the non-core routers tell each of the core routers what
they know, and learn from them what the other non-core routers know.
Eventually, all the routers know about all the nets. The number of
core routers determines how long it will take to propagate the routing
information -- the fewer, the faster.
Unlike RTMP, in which a router offers other its routing services to a
particular net, aaROUTE and aaROUTEQ packets inform routers about
routing services provided by others. Because of this, the distance
field of tuples should be maintained differently. The KIP and K-Star
implementations tend to increment the distance unnecessarily, in that
a non-core router will end up with routes of distance 3 which are
really only 2 hops away. The GatorBox does the same for
compatibility.
5. Maintenance of Routes
Routes acquired through aaROUTEI packets are never aged. They are
purged when a new ROUTEI packet is received. Routes acquired through
aaROUTEQ and aaROUTE packets are aged and expired like routes acquired
through RTMP, except that they must be aged more slowly. The RTMP
aging algorithm indicates that new routes are "Good" until the next
pass of the Validity timer (a period of not more than 20 seconds).
The routes are then "Suspect" for another Validity timer period (20
seconds), and then "Bad" for another timer period. "Bad" routes are
expired after another 2 Validity periods (per AppleTalk 2.0).
The example set by the KIP code is to extend the "Suspect" time of a
route from 1 to 15 Validity timer periods. This provides a 5 minute
window for the route to be refreshed, which should be adequate if the
number of core routers is relatively small.
6. Zone Information
The AA protocol provides 2 mechanisms for adding zone information to
routes, aaZONE and aaZONEQ. The aaZONE packet is a request to atalkad
for all zone information corresponding to the initial routes. The
response packet (also aaZONE) contains tuples of the form:
net# net# ... 0 zonename
net# net# ... 0 zonename
...
0xFFFF
The aaZONEQ packet is really a normal ZIP packet wrapped in an AA
protocol packet, providing for ZIP_Query and ZIP_Reply.
A router should send an aaZONE or aaZONEQ packet to atalkad to learn
the zone names of any AA route nets. For other IP-based routes
(learned about through aaROUTEQ and aaROUTE packets), the router
should send an aaZONEQ packet to the bridge router.
7. Restart
The AA protocol provides a procedure for restarting routers. When a
router receives an aaRESTART packet, it should restart at least its
AppleTalk router subsystem.
8. Security
All AA protocol packets provide a "magic number" to double check
packet validity. Furthermore, routers are encouraged to check the
acceptability of the IP host sending the packet. Typically packets
should be taken from the administration host, the debug host (whose
address is specified in the aaCONF packet), and any IP host which
appeared with a K flag in an aaROUTEI packet.
9. Packet Formats
AA protocol packets start with a common header:
+-------------------------------------+
| magic number |
+-------+---------+-------------------+
| type | flags | data size (bytes) |
+-------+---------+-------------------+
| sender's IP address |
+-------------------------------------+
| data |
| (up to 512 bytes) |
+-------------------------------------+
Where:
Magic number: 0xFF068030
Flags: 0
Type:
aaCONF 1
aaROUTEI 2
aaROUTE 3
aaROUTEQ 4
aaRESTART 5
aaZONE 6
aaZONEQ 7
The data portion of the aaCONF packet has the following structure:
+--------------------------------------------------------+
| IP broadcast address |
+--------------------------------------------------------+
| IP name server address |
+--------------------------------------------------------+
| IP debug host address |
+--------------------------------------------------------+
| IP file server address |
+--------------------------------------------------------+
| Other IP address (4 long words) |
+--------------------------------------------------------+
| |
+--------------------------------------------------------+
| |
+--------------------------------------------------------+
| |
+----------------------------+---------------------------+
| EtherTalk net # | Base UDP WKS port |
+----------------------------+---------------------------+
| flags |
+----------------------------+---------------------------+
| # of static IP addresses | # of dyn. IP addresses |
+----------------------------+---------------------------+
| LocalTalk net # | KIP net # |
+--------------------------------------------------------+
Where:
Flags:
STAY_IN_ZONE 1
LASER_FILTER 2
TILDE_FILTER 4
The data portion of the aaROUTE, aaROUTEI and aaROUTEQ packets is a
series of tuples of the following structure:
+--------------------------------------------------------+
| IP net or node address |
+----------------------------+---------------+-----------+
| AppleTalk net # | flags | hops |
+----------------------------+---------------+-----------+
Where:
Flags:
Core Router 0x10
Rebroadcast Host 0x20
Network 0x40
Network type 0x01, 0x02, 0x03, 0x04
(used only with Network flag)
K Box 0x80
Etalk 0x01
(used only with K Box flag)
Received from AA 0x08
10. Other Numbers
AA protocol UDP port: 901
AA rebroadcast UDP port: 902
Debugging protocol UDP port: 900
Old UDP WKS base UDP port: 768
New UDP WKS base UDP port: 200
Non-WKS base UDP port: 16384